﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis; 

namespace Admin.NET.Application.Entity;

/// <summary>
/// 评论信息实体类
/// </summary>
[SugarTable("base_comment", "评论信息")]
public class CommentEntity : EntityBase
{
    /// <summary>
    /// 获取或设置评论所属的对象类型（如：News、Property、RentalListing）。
    /// </summary>
    [SugarColumn(ColumnDescription = "对象类型", Length = 50, IsNullable = false)]
    public string ObjectType { get; set; }

    /// <summary>
    /// 获取或设置评论所属对象的ID。
    /// </summary>
    [SugarColumn(ColumnDescription = "对象ID", IsNullable = false)]
    public String ObjectId { get; set; }
    
    /// <summary>
    /// 获取或设置用户头像地址（URL）。
    /// </summary>
    [SugarColumn(ColumnDescription = "用户头像地址", Length = 300, IsNullable = true)]
    public string UserAvatarUrl { get; set; }

    /// <summary>
    /// 获取或设置评论内容。
    /// </summary>
    [SugarColumn(ColumnDescription = "评论内容", Length = 200, IsNullable = false)]
    public string Content { get; set; }

    /// <summary>
    /// 获取或设置评分（如1-5分），可用于带评分的评论。
    /// </summary>
    [SugarColumn(ColumnDescription = "评分（0-5）", IsNullable = true)]
    public decimal? Rating { get; set; }

    /// <summary>
    /// 获取或设置是否为管理员评论。
    /// </summary>
    [SugarColumn(ColumnDescription = "是否为管理员评论")]
    public bool IsAdmin { get; set; } = false;

    /// <summary>
    /// 获取或设置是否被屏蔽或删除。
    /// </summary>
    [SugarColumn(ColumnDescription = "是否启用")]
    public bool IsActive { get; set; } = true;
     
}
